/**
 * @description: common
 * @date: 2022-04-24 21:30
 */

import request from '../request'

// 登录
export function login (data) {
  // return request({ url: '/v1/admin/user/login', method: 'post', data, isLoading: true })
  return Promise.resolve({ data: 'token' })
}

// 菜单
export function menu () {
  // return request({ url: '/v1/admin/user/menu', isLoading: true })
  return Promise.resolve({
    data: [
      {
        id: 1,
        title: '系统管理',
        layout: '',
        name: 'systemManager',
        sort: 0,
        pid: 0,
        sub: [
          {
            id: 3,
            title: '修改密码',
            layout: '/layout/systemManager/systemPasswordManager',
            name: 'systemPasswordManager',
            sort: 0,
            pid: 1,
            sub: null
          }
        ]
      },
      {
        id: 8,
        title: '数据统计',
        layout: '/layout/dashboardManager',
        name: 'dashboardManager',
        sort: 0,
        pid: 0,
        sub: []
      },
      {
        id: 10,
        title: '公告管理',
        layout: '/layout/noticeManager',
        name: 'noticeManager',
        sort: 0,
        pid: 0,
        sub: []
      },
      {
        id: 11,
        title: '用户管理',
        layout: '/layout/userManager',
        name: 'userManager',
        sort: 0,
        pid: 0,
        sub: []
      }
    ]
  })
}
